<body>
Service Provider Interface classes.

<h2>Service Provider Requirements</h2>
Although Scriptella supports any JDBC Driver through
JDBC Bridge, writing a custom Provider may be easier and more effective.
The requirements for Service Provider are minimal:
<ul>
    <li>Provide a class implementing <a href="ScriptellaDriver.html">Scriptella Driver Interface</a>.
        This class must have a public no-arg constructor. We recommend to use
        <a href="AbstractScriptellaDriver.html">AbstractScriptellaDriver</a> as a base.</li>
    <li>Create a subclass of <a href="ProviderException.html">Provider Exception</a>. Override methods if necessary</li>
</ul>

<h2>Driver Registration</h2>
No special steps are required to register Scriptella Provider.
Simply specify driver class name in a <b>driver</b> attribute of <b>&lt;connection&gt;</b> element.
Examples:
<code><pre>
    &lt;connection driver="provider.class.name" url="provider:url"/&gt;
</pre></code>
You may also specify a driver's classpath. Classpath URIs are resolved relative to an ETL file:
<code><pre>
    &lt;connection driver="provider.class.name" url="provider:url" classpath="driver.jar;lib/driver-addons.jar"/&gt;
</pre></code>
In this case the driver is loaded using a <a href="DriversClassLoader.html">separate classloader</a>
<h2>Driver Alias</h2>
Putting a driver into <code><a href="../driver/package-summary.html">scriptella.driver</a>.<b>SHORT_NAME</b></code> package
and specifying "Driver" as a class name automatically
allows referencing the driver by a SHORT_NAME alias.<br><u>Example:</u><br/>
<code>&lt;connection driver="SHORT_NAME"&gt;</code>
<br/>loads <code>scriptella.driver.SHORT_NAME.Driver</code> class.
<h2>Additional Recommendations</h2>
<ul>
    <li><code>url</code> is not a required attribute for custom providers, nevertheless
        it may make sense to specify URL protocol for your driver.</li>
    <li>If your solution performs scripts compilation and this procedure is expensive, use caching
        based on Resource indentities as described in javadoc for <a href="Connection.html">Connection</a>.</li>

    <li>Pack your provider as a JAR file setting specification title, version and other attributes in manifest.
        Adding a simple readme file inside a JAR may help users to quickly get how to use it.</li>
    <li>Scriptella built-in drivers can be used as a reference implementation to create a new driver.</li>
</ul>


</body>